Skip to content

fix(facelets): reject unrepresentable center twists - #36

Merged
wstein merged 1 commit into
mainfrom
fix/center-orientation
Nov 10, 2026
Merged

wstein merged 1 commit into
mainfrom
fix/center-orientation

Conversation

@wstein

@wstein wstein commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Reject nonzero center orientations instead of silently discarding picture-cube state during color-facelet conversion.

  • Return a specific error from patternDataToFacelets; the existing exception wrapper throws.
  • Cover all six centers and quarter/half/inverse twists in ReScript.
  • Verify all 18 standard cubing.js face turns on both default and facelet-derived patterns; verify a tracked picture-cube R turn is rejected.
  • Document that orientationMod: 1 denotes untracked centers and that color facelets and current Console Orbit64 exports cannot carry center twists.

Validation:

  • ReScript conversion suite: 26 passed; targeted adapter/event/export suites: 31 passed.
  • Red before fix: core 1 failed/25 passed; adapter 1 failed/5 passed, both at silent-loss regressions.
  • Targeted mutations: removed twist guard detected by both new rejection tests; changed decoded center modulus detected by the ordinary-move test.
  • npm test: core 208 passed; app 218 passed, 2 skipped. npm run build: passed.
  • Lint, TypeScript, ReScript/Prettier formatting and diff checks: 0 errors.
  • Session-link check: 0.

Not verified: physical picture-cube hardware; browser tests; full mutation sweep. This does not add center-orientation storage or migrate Orbit64 formats.

Blockers: independent review of the exact head and required CI checks.

Closes #31

Reject nonzero center orientations instead of silently dropping picture-cube state.

Co-Authored-By: Codex <noreply@openai.com>
@wstein

wstein commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Review: CLEAR head=48ca8fa7886b39e6981dd2b0f896b2ddf9309a22 patch-id=f8a3c9fdb503561b5c1864c84b30f0afc7618e83 pr=36
Independent full-diff review: no remaining findings; the specific rejection prevents silently losing tracked center twists in color facelets.
Canonical center positions and malformed-array checks stay in force. Nonzero twists reject on all six centers for quarter, half and inverse turns; the exception wrapper still throws.
Own ReScript build and targeted replay: 26 core tests and 31 adapter/event/export tests pass, including all 18 cubing.js moves from both default and facelet-derived untracked-center patterns.
Six independent source mutants fail by intended assertions: removed guard, first-center-only, lost half turn, lost inverse turn, wrong decoded orientation modulus and adapter-side twist erasure.
The original orientationMod=1 decode convention remains unchanged; color facelets and current Console exports do not become lossless picture-cube or Orbit64 orientation storage.
Exact-head CI42766312924 (pull_request) and CI42766264106 (push) succeed at attempt1; all ten PR jobs pass, including browser coverage and packaging. Workflow files are unchanged.
Checks API reports GitHub Actions only and no commit-status contexts. Probe merge is clean against unchanged main7c907d94.
Local full suite, local browser/hardware tests and the full mutation sweep were not run; scratch-only mutations restored their source and rebuilt the core.
Reviewer did not set Ready, labels, dispatch workflows, change Gitlinks or merge.

@wstein
wstein marked this pull request as ready for review November 10, 2026 07:20
@wstein
wstein merged commit ebe7d32 into main Nov 10, 2026
20 checks passed
@wstein
wstein deleted the fix/center-orientation branch November 10, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core): centersOriented ignores center orientation values, twist is dropped silently

1 participant